import ParentView from '_c/layout/ParentView'

const routes = [
  {
    path: '/',
    meta: {
      hideMenu: true
    },
    redirect: '/train'
  },
  {
    path: '/train',
    name: 'train',
    redirect: '/train/bank',
    meta: {
      title: '安全教育培训'
    },
    component: ParentView,
    children: [
      {
        path: 'resource',
        name: '学习资料管理',
        meta: {
          icon: 'md-book',
          title: '学习资料管理'
        },
        component: () => import('_v/train/resource.vue')
      },
      {
        path: 'bank',
        name: '试题管理',
        meta: {
          icon: 'md-bookmark',
          title: '试题管理'
        },
        component: () => import('_v/train/bank.vue')
      },

      {
        path: 'paper',
        name: '试卷管理',
        meta: {
          icon: 'md-paper',
          title: '试卷管理'
        },
        component: () => import('_v/train/paper.vue')
      },
      {
        path: 'plan',
        name: '培训计划',
        meta: {
          icon: 'md-albums',
          title: '培训计划'
        },
        component: () => import('_v/train/plan.vue')
      },
      {
        path: 'task',
        name: '培训任务',
        meta: {
          icon: 'md-basket',
          title: '培训任务'
        },
        component: () => import('_v/train/task.vue')
      }
    ]
  },
  {
    path: '*',
    meta: {
      hideMenu: true
    },
    component: () => import('_v/error/404')
  }
]

export default routes
